{strip}
{include file="common/header.tpl"}
<section class="main">
    <article class="right-col">  
        <h2>{$language.title.image} &raquo; <a href="{$smarty.const.HOST_BACKEND}image/add">{$language.ahref.add}</a></h2>
        <form id="frmImage" name="frmImage" method="post" action="{$smarty.const.HOST_BACKEND}image/act" enctype="multipart/form-data">
            <input type="hidden" name="paction" id="paction" />
            <input type="hidden" name="pcancelsearch" id="pcancelsearch"/>
            <input type="hidden" name="typeId" id="typeId" value="{$typeId}" />
            <input type="hidden" name="srcId" id="srcId" value="{$srcId}"/>         
            {if isset($arrResult) && is_array($arrResult)}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}            
            {if isset($arrResult) }
            	<table class="image" cellpadding="0" cellspacing="0">
                	<tbody>
                        {foreach key=i item=item from=$arrResult}
                        	{if $i%4==3}
	                        	<tr>
                            {/if}
                            		<td>
                                        <a href="{$smarty.const.HOST_BACKEND}image/edit?id={$item.id}"> 
                                            {generate_image  path=$item.path name=$item.image ext=$item.format alt=$smarty.const.DOMAIN}
                                        </a>
                                    </td>
                            {if $i%4!=3}
                            	</tr>
                            {/if}
                        {/foreach}
                    </tbody>
                </table>
            {/if}
            <div id="image-list">
                {if isset($arrResult) }
                    {foreach item=item from=$arrResult}
                        <div class="image-item">
                            <a href="{$smarty.const.HOST_BACKEND}image/edit?id={$item.id}"> {generate_image  path=$item.path name=$item.image ext=$item.format alt=$smarty.const.DOMAIN}</a>
                        </div>
                    {/foreach}
                {/if}
            </div>
            {if isset($arrResult) && is_array($arrResult)}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}
            {paging offset=$intOffset total=$intTotal limit=$intLimit}            
        </form>
	</article>
</section>
{include file="common/footer.tpl"}
{/strip}
                
